package com.javabasic;

public class HelloWorld {
	public static void main (String [] args) {
		String stringOut = "";
		
		for (int a = 1; a <1000; a++) {
			for (int b = 1; b < 1000 - a; b++) {
				int c = 1000 - a - b;
				if (LaBoSoPythagoras(a, b, c)) {
					stringOut += "a = " + a + " b = " + b + " c = " + c + "\n"
							+ "a + b + c = " + (a + b + c) + "\n";
					System.out.println(stringOut);
				}
			}
		}
			
		System.out.println("End Program");
	}
	
	static boolean LaBoSoPythagoras(int a, int b, int c) {
		if ((a*a + b*b == c*c) && (a <= b) && (b < c))
			return true;
		else
			return false;
	}
}
